<!DOCTYPE html>


<html lang="en">
  

    <head>
      <meta charset="utf-8" />
        
      <meta
        name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1"
      />
      <title>GBase8s安装部署规范 |  朝花夕拾</title>
  <meta name="generator" content="hexo-theme-ayer">
      
      <link rel="shortcut icon" href="/ww.ico" />
       
<link rel="stylesheet" href="/dist/main.css">

      
<link rel="stylesheet" href="/css/fonts/remixicon.css">

      
<link rel="stylesheet" href="/css/custom.css">
 
      <script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
       
 

      <link
        rel="stylesheet"
        href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
      />
      <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>

      <!-- mermaid -->
      
      <style>
        .swal2-styled.swal2-confirm {
          font-size: 1.6rem;
        }
      </style>
    </head>
  </html>
</html>


<body>
  <div id="app">
    
      
    <main class="content on">
      <section class="outer">
  <article
  id="post-GBase8s安装部署规范"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  GBase8s安装部署规范
</h1>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/05/10/GBase8s%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2%E8%A7%84%E8%8C%83/" class="article-date">
  <time datetime="2023-05-10T00:54:56.000Z" itemprop="datePublished">2023-05-10</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/GBase8s/">GBase8s</a>
  </div>
  
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> Word count:</span>
            <span class="post-count">4k</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> Reading time≈</span>
            <span class="post-count">22 min</span>
        </span>
    </span>
</div>
 
    </div>
      
    <div class="tocbot"></div>




  
    <div class="article-entry" itemprop="articleBody">
       
  <h2 id="数据库版本"><a href="#数据库版本" class="headerlink" title="数据库版本"></a>数据库版本</h2><p>GBase8sV8.7_AEE_2.0.1A2_6_7b5949_RHEL6_x86_64.tar       </p>
<p>​	说明： </p>
<p>​		1、2020年03月10日发版</p>
<p>​		2、MD5值为：  04a49447cfab89b3748f82f22c08ea77</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei3 ~]$ onstat -V</span><br><span class="line">GBase Database Server Version 12.10.FC4G1AEE_2.0.1A2_6_7b5949 Software Serial Number AAA#B000000</span><br><span class="line">[gbasedbt@wei3 ~]$ onstat -version</span><br><span class="line">Program Name:           onstat</span><br><span class="line">Build Number:           2.0.1A2_6_7b5949_N303</span><br><span class="line">Build Host:             redhat</span><br><span class="line">Build OS:               Linux 2.6.32-358.el6.x86_64</span><br><span class="line">Build Date:             Tue Mar 10 12:13:20 CST 2020</span><br><span class="line">Build Timestamp:        10-Mar-2020.12:00:40UTC-06</span><br><span class="line">GLS Version:            glslib-6.00.FC5</span><br><span class="line">[gbasedbt@wei3 ~]$ </span><br></pre></td></tr></table></figure>



<h2 id="数据库jdbc驱动版本"><a href="#数据库jdbc驱动版本" class="headerlink" title="数据库jdbc驱动版本"></a>数据库jdbc驱动版本</h2><p>gbasedbtjdbc_a2_6.jar</p>
<p>​	说明： </p>
<p>​		1、2020年03月10日发版</p>
<p>​		2、MD5值为：  c1a443ab09e700971886099380844e85</p>
<h2 id="安装规范"><a href="#安装规范" class="headerlink" title="安装规范"></a>安装规范</h2><h3 id="关闭防火墙"><a href="#关闭防火墙" class="headerlink" title="关闭防火墙"></a>关闭防火墙</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">系统工程师决定-可选</span></span><br><span class="line">service firewalld stop</span><br><span class="line">chkconfig firewalld off</span><br><span class="line">systemctl status firewalld.service</span><br><span class="line">systemctl stop firewalld.service</span><br><span class="line">systemctl disable firewalld.service</span><br><span class="line">systemctl list-unit-files （chkconfig --list 弃用）</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">centos6按如下方法关闭</span></span><br><span class="line">service iptables stop</span><br><span class="line">chkconfig iptables off</span><br></pre></td></tr></table></figure>

<h3 id="关闭DNS"><a href="#关闭DNS" class="headerlink" title="关闭DNS"></a>关闭DNS</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">系统工程师决定-可选</span></span><br><span class="line">sed -i &quot;s#^hosts.*#hosts:      files#g&quot; /etc/nsswitch.conf</span><br></pre></td></tr></table></figure>

<h3 id="修改ulimit内核参数"><a href="#修改ulimit内核参数" class="headerlink" title="修改ulimit内核参数"></a>修改ulimit内核参数</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">系统工程师决定-可选</span></span><br><span class="line">[root@localhost ~]#vi /etc/security/limits.conf</span><br><span class="line">gbasedbt soft nproc 65535</span><br><span class="line">gbasedbt hard nproc 65535</span><br><span class="line">gbasedbt soft nofile 1048576</span><br><span class="line">gbasedbt hard nofile 1048576</span><br><span class="line">[root@localhost ~]#ulimit -a</span><br></pre></td></tr></table></figure>

<h3 id="修改内核参数"><a href="#修改内核参数" class="headerlink" title="修改内核参数"></a>修改内核参数</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">系统工程师决定-可选</span></span><br><span class="line">[root@wei3 ~]# vi /etc/sysctl.conf </span><br><span class="line">fs.aio-max-nr=3145728         </span><br><span class="line">kernel.shmmax=4398046511104   </span><br><span class="line">kernel.shmall=4294967296      </span><br><span class="line">kernel.shmmni=4096			  </span><br><span class="line">kernel.sem=250 32000 100 142 </span><br><span class="line">[root@wei3 ~]# sysctl -p</span><br></pre></td></tr></table></figure>

<h3 id="上传介质"><a href="#上传介质" class="headerlink" title="上传介质"></a>上传介质</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">[root@wei3 sanxiajichang]# cd /opt/soft/gbase/sanxiajichang</span><br><span class="line">[root@wei3 sanxiajichang]# ls -lrt</span><br><span class="line">total 309944</span><br><span class="line">-rw-rw-rw-. 1 root root 316211200 Aug 12 16:58 GBase8sV8.7_AEE_2.0.1A2_6_7b5949_RHEL6_x86_64.tar</span><br><span class="line">-rw-rw-rw-. 1 root root   1169489 Aug 12 16:58 gbasedbtjdbc_a2_6.jar</span><br><span class="line">[root@wei3 sanxiajichang]# </span><br></pre></td></tr></table></figure>

<h3 id="解压介质"><a href="#解压介质" class="headerlink" title="解压介质"></a>解压介质</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line">[root@wei3 sanxiajichang]# ls</span><br><span class="line">GBase8sV8.7_AEE_2.0.1A2_6_7b5949_RHEL6_x86_64.tar  gbasedbtjdbc_a2_6.jar</span><br><span class="line">[root@wei3 sanxiajichang]# mkdir server</span><br><span class="line">[root@wei3 sanxiajichang]# cd server/</span><br><span class="line">[root@wei3 server]# mv ../GBase8sV8.7_AEE_2.0.1A2_6_7b5949_RHEL6_x86_64.tar ./</span><br><span class="line">[root@wei3 server]# tar xvf GBase8sV8.7_AEE_2.0.1A2_6_7b5949_RHEL6_x86_64.tar </span><br><span class="line">ids_install</span><br><span class="line">onsecurity</span><br><span class="line">doc/</span><br><span class="line">doc/ids_unix_relnotes_12.10.html</span><br><span class="line">doc/ids_machine_notes_12.10.txt</span><br><span class="line">ids.properties</span><br><span class="line">.gbase.properties</span><br><span class="line">[root@wei3 server]# </span><br><span class="line">[root@wei3 server]# ls -lrt</span><br><span class="line">total 617572</span><br><span class="line">drwxr-xr-x. 2 root root        77 Mar 10  2020 doc</span><br><span class="line">-rwxr-xr-x. 1 root root     81782 Mar 10  2020 onsecurity</span><br><span class="line">-rw-r--r--. 1 root root      1864 Mar 10  2020 ids.properties</span><br><span class="line">-rwxr-xr-x. 1 root root 316095510 Mar 10  2020 ids_install</span><br><span class="line">-rw-rw-rw-. 1 root root 316211200 Aug 12 16:58 GBase8sV8.7_AEE_2.0.1A2_6_7b5949_RHEL6_x86_64.tar</span><br><span class="line">[root@wei3 server]# </span><br></pre></td></tr></table></figure>

<h3 id="创建用户"><a href="#创建用户" class="headerlink" title="创建用户"></a>创建用户</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">groupadd gbasedbt -g 500</span><br><span class="line">useradd  gbasedbt -u 500 -g gbasedbt -m -d /home/gbasedbt</span><br><span class="line">passwd gbasedbt #设置密码为 GBase123</span><br></pre></td></tr></table></figure>

<h3 id="安装软件"><a href="#安装软件" class="headerlink" title="安装软件"></a>安装软件</h3><p>​	说明：	</p>
<p>​				1、今后统一安装到 &#x2F;opt&#x2F;gbase 目录。</p>
<p>​				2、选择 2- No - do not create an instance 不要创建实例。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br></pre></td><td class="code"><pre><span class="line">[root@wei3 server]# ls</span><br><span class="line">doc  GBase8sV8.7_AEE_2.0.1A2_6_7b5949_RHEL6_x86_64.tar  ids_install  ids.properties  onsecurity</span><br><span class="line">[root@wei3 server]# </span><br><span class="line">[root@wei3 server]# ./ids_install </span><br><span class="line">Preparing to install...</span><br><span class="line">Extracting the JRE from the installer archive...</span><br><span class="line">Unpacking the JRE...</span><br><span class="line">Extracting the installation resources from the installer archive...</span><br><span class="line">Configuring the installer for this system&#x27;s environment...</span><br><span class="line"></span><br><span class="line">Launching installer...</span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">GBase Software Bundle                            (created with InstallAnywhere)</span><br><span class="line">-------------------------------------------------------------------------------</span><br><span class="line"></span><br><span class="line">Preparing CONSOLE Mode Installation...</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Getting Started</span><br><span class="line">---------------</span><br><span class="line"></span><br><span class="line">This application  will guide you through the installation of GBase Software </span><br><span class="line">Bundle.</span><br><span class="line">Copyright General Data Corporation 2014, 2022. All rights reserved.</span><br><span class="line"></span><br><span class="line">1. Release Notes</span><br><span class="line">The Release Notes can be found in </span><br><span class="line">/opt/soft/gbase/sanxiajichang/server/doc/ids_unix_relnotes_12.10.html.</span><br><span class="line">2. Launch Information Center</span><br><span class="line">Access the GBase Information Center at http://www.gbase.cn.</span><br><span class="line">To Begin Installation, respond to each prompt to proceed to the next step in </span><br><span class="line">the installation.</span><br><span class="line">If you want to change something on a previous step, type &#x27;back&#x27;.</span><br><span class="line">You may cancel this installation at any time by typing &#x27;quit&#x27;.</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO CONTINUE: </span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">License Agreement</span><br><span class="line">-----------------</span><br><span class="line"></span><br><span class="line">Installation and Use of GBase Software Bundle Requires Acceptance of the </span><br><span class="line">Following License Agreement:</span><br><span class="line"></span><br><span class="line">Thank you for choosing GBase product!</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Please read carefully the following licencing agreement before installing any </span><br><span class="line">product: TIANJIN GENERAL DATA TECHNOLOGY CO. LTD. LICENSE AGREEMENT</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSETERMS  </span><br><span class="line">(COLLECTIVELY &quot;AGREEMENT&quot;) CAREFULLY BEFORE OPENING THE SOFTWAREMEDIA PACKAGE. </span><br><span class="line">BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS </span><br><span class="line">AGREEMENT.  IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR </span><br><span class="line">ACCEPTANCE OF THESE  TERMS. IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY </span><br><span class="line">RETURN THE UNUSED  SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND.</span><br><span class="line"></span><br><span class="line">1. LICENSE TO USE. GeneralData grants you a non-exclusive and non-transferable </span><br><span class="line">license for  the internal use only of the accompanying software and </span><br><span class="line">documentation and any error corrections  provided by GeneralData(collectively </span><br><span class="line">&quot;Software&quot;), by the number of users and the class of  computer hardware for </span><br><span class="line">which the corresponding fee has been paid.</span><br><span class="line"></span><br><span class="line">2. RESTRICTIONS. Software is confidential and copyrighted. Title to Software </span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO CONTINUE: </span><br><span class="line"></span><br><span class="line">and all  associated intellectual property rights is retained by GeneralData </span><br><span class="line">and/or its licensors. Except as  specifically authorized in any Supplemental </span><br><span class="line">License Terms, you may not make copies of Software,  other than a single copy </span><br><span class="line">of Software for archival purposes. Unless enforcement is prohibited by  </span><br><span class="line">applicable law, you may not modify, decompile, or reverse engineer Software. </span><br><span class="line">You acknowledge  that Software is not designed, licensed or intended for use in</span><br><span class="line">the design, construction, operation  or maintenance of any nuclear facility. </span><br><span class="line">GeneralData disclaims any express or implied warranty  of fitness for such </span><br><span class="line">uses. No right, title or interest in or to any trademark, service mark, logo or</span><br><span class="line">trade name of GeneralData or its licensors is granted under this Agreement.</span><br><span class="line"></span><br><span class="line">3. DISCLAIMER OF WARRANTY. Unless specified in this agreement, all express of </span><br><span class="line">implied  conditions, representations and warranties, including any implied </span><br><span class="line">warranty of merchantability,  fitness for aparticular purpose or </span><br><span class="line">non-infringement are disclaimed, except to theextent that  these disclaimers </span><br><span class="line">are held to be legally invalid.</span><br><span class="line"></span><br><span class="line">4. LIMITATION OF LIABILITY. To the extent not prohibited by law, in no event </span><br><span class="line">will GeneralData  or its licensors be liable for any lost revenue, profit or </span><br><span class="line">data, or for special, indirect,  consequential, incidental orpunitive damages, </span><br><span class="line">however caused regardless of the theory of liability,  arising out of or </span><br><span class="line">related to the use of or inability to use software, even if GeneralData has </span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO CONTINUE: </span><br><span class="line"></span><br><span class="line">been  advised of the possibility of such damages. In no event will </span><br><span class="line">GeneralData&#x27;s libility to you, whether  incontract, tort(including negligence),</span><br><span class="line">or otherwise, exceed the amount paid by you for Software  under this Agreement.</span><br><span class="line">The foregoing limitations will apply even if the above stated warranty  fails </span><br><span class="line">of itsessential purpose.</span><br><span class="line"></span><br><span class="line">5. TERMINATION. This Agreement is effective until terminated. You may terminate</span><br><span class="line">this  Agreement at any time by destroying all copies of Software. This </span><br><span class="line">Agreement will terminate  immediately without noticefrom GeneralData if you </span><br><span class="line">fail to comply with any provision of this  Agreement. Upon Termination, you </span><br><span class="line">must destroy all copies of Software.</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">6. EXPORT REGULATIONS. All Software and technical data delivered under this </span><br><span class="line">Agreement are  subject to US export control laws and may be subject to export </span><br><span class="line">or import regulations in other  countries. You agree to comply strictly with </span><br><span class="line">all such laws and regulations and acknowledge that  you have the responsibility</span><br><span class="line">to obtain such licenses to export, re-export, or import as may be  required </span><br><span class="line">after delivery to you.</span><br><span class="line"></span><br><span class="line">7. CHINESE GOVERNMENT RESTRICTED. If Software is being acquired by or on behalf</span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO CONTINUE: </span><br><span class="line"></span><br><span class="line">of the  Chinese Government, then the Government&#x27;s rights in Software and </span><br><span class="line">accompanying documentation  will be only as set forth in this Agreement.</span><br><span class="line"></span><br><span class="line">8. GOVERNING LAW. Any action related to this Agreement will be governed by </span><br><span class="line">Chinese law:  &quot;COPYRIGHT LAW OF THE PEOPLE&#x27;S REPUBLIC OF CHINA&quot;, &quot;PATENT LAW OF</span><br><span class="line">THE PEOPLE&#x27;S  REPUBLIC OF CHINA&quot;, &quot;TRADEMARK LAW OF THE PEOPLE&#x27;S REPUBLIC OF </span><br><span class="line">CHINA&quot;, &quot;COMPUTER  SOFTWARE PROTECTION REGULATIONS OF THE PEOPLE&#x27;S REPUBLIC OF </span><br><span class="line">CHINA&quot;. No choice of  law rules of any jurisdiction will apply.&quot;</span><br><span class="line"></span><br><span class="line">9. SEVERABILITY. If any provision of this Agreement is held to be </span><br><span class="line">unenforceable, this  Agreement will remain in effect with the provision </span><br><span class="line">omitted, unless omission would frustrate the  intent of the parties, in which </span><br><span class="line">case this Agreement will immediately terminate.</span><br><span class="line"></span><br><span class="line">10. INTEGRATION. This Agreement is the entire agreement between you and </span><br><span class="line">GeneralData  relating to its subject matter. It supersedes all prior or </span><br><span class="line">contemporaneous oral or written  communications, proposals, representations and</span><br><span class="line">warranties and prevails over any conflicting or  additional terms of any quote,</span><br><span class="line">order, acknowledgment, or other communication between the  parties relating to </span><br><span class="line">its subject matter during the term of this Agreement. No modification of this  </span><br><span class="line">Agreement will be binding, unless in writing and signed by an authorize </span><br><span class="line">depresentative of each  party. When the translation document has the different </span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO CONTINUE: </span><br><span class="line"></span><br><span class="line">meaning or has the conflicting views with  Chinese original text conflict, </span><br><span class="line">should take the laws and regulations promulgation unit as well as  the </span><br><span class="line">GeneralData issue Chinese original text as the standard.</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">All trademarks and registered trademarks mentioned herein are the  property of </span><br><span class="line">their respective owners.</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): y</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Installation Location</span><br><span class="line">---------------------</span><br><span class="line"></span><br><span class="line">Choose location for software installation.</span><br><span class="line"></span><br><span class="line">  Default Install Folder: /opt/GBASE/gbase</span><br><span class="line"></span><br><span class="line">ENTER AN ABSOLUTE PATH, OR PRESS &lt;ENTER&gt; TO ACCEPT THE DEFAULT</span><br><span class="line">      : /opt/gbase</span><br><span class="line"></span><br><span class="line">INSTALL FOLDER IS: /opt/gbase</span><br><span class="line">   IS THIS CORRECT? (Y/N): y</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Installation or Distribution</span><br><span class="line">----------------------------</span><br><span class="line"></span><br><span class="line">Select the installation type.</span><br><span class="line"></span><br><span class="line">Typical: Install the database server with all features and a database server </span><br><span class="line">that</span><br><span class="line">is configured with default values. Includes:</span><br><span class="line">** Client Software Development Kit (CSDK)</span><br><span class="line">** Java Database Connectivity (JDBC)</span><br><span class="line">Minimum disk space required: 700-800MB</span><br><span class="line"></span><br><span class="line">Custom: Install the database server with specific features and software that </span><br><span class="line">you need.</span><br><span class="line">Optionally install a configured database server instance.</span><br><span class="line">Minimum disk space required: 75 MB (without a server instance)</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">  -&gt;</span><span class="language-bash">1- Typical installation</span></span><br><span class="line">    2- Custom installation</span><br><span class="line">    3- Extract the product files (-DLEGACY option)</span><br><span class="line"></span><br><span class="line">ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS &lt;ENTER&gt; TO ACCEPT THE DEFAULT:: </span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Server Instance Creation</span><br><span class="line">------------------------</span><br><span class="line"></span><br><span class="line">Create a server instance?</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">  -&gt;</span><span class="language-bash">1- Yes - create an instance</span></span><br><span class="line">    2- No - do not create an instance</span><br><span class="line"></span><br><span class="line">ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS &lt;ENTER&gt; TO ACCEPT THE DEFAULT:: 2</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Installation Summary</span><br><span class="line">--------------------</span><br><span class="line"></span><br><span class="line">Please review the following before continuing:</span><br><span class="line"></span><br><span class="line">Product Name:</span><br><span class="line">    GBase Software Bundle</span><br><span class="line"></span><br><span class="line">Install Folder:</span><br><span class="line">    /opt/gbase</span><br><span class="line"></span><br><span class="line">Product Features:</span><br><span class="line">    GBase database server,</span><br><span class="line">    Base Server,</span><br><span class="line">    Extensions and tools,</span><br><span class="line">    J/Foundation,</span><br><span class="line">    Database extensions,</span><br><span class="line">    Conversion and reversion support,</span><br><span class="line">    XML publishing,</span><br><span class="line">    Demonstration database scripts,</span><br><span class="line">    Enterprise Replication,</span><br><span class="line">    Data loading utilities,</span><br><span class="line">    onunload and onload utilities,</span><br><span class="line">    dbload utility,</span><br><span class="line">    Backup and Restore,</span><br><span class="line">    archecker utility,</span><br><span class="line">    ON-Bar utility,</span><br><span class="line">    Interface to Tivoli Storage Manager,</span><br><span class="line">    Administrative utilities,</span><br><span class="line">    Performance monitoring utilities,</span><br><span class="line">    Miscellaneous monitoring utilities,</span><br><span class="line">    Auditing utilities,</span><br><span class="line">    Database import and export utilities,</span><br><span class="line">    JSON Client Support,</span><br><span class="line">    Global Language Support (GLS),</span><br><span class="line">    Chinese</span><br><span class="line"></span><br><span class="line">Disk Space Information (for Installation Target): </span><br><span class="line">    Required:  494,697,775 Bytes</span><br><span class="line">    Available: 23,135,158,272 Bytes</span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO CONTINUE: </span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Ready To Install</span><br><span class="line">----------------</span><br><span class="line"></span><br><span class="line">InstallAnywhere is now ready to install GBase Software Bundle onto your system </span><br><span class="line">at the following location:</span><br><span class="line"></span><br><span class="line">   /opt/gbase</span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO INSTALL: </span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Installing...</span><br><span class="line">-------------</span><br><span class="line"></span><br><span class="line"> [==================|==================|==================|==================]</span><br><span class="line"> [------------------|------------------|------------------|------------------]</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">===============================================================================</span><br><span class="line">Installation Complete</span><br><span class="line">---------------------</span><br><span class="line"></span><br><span class="line">Congratulations! GBase Software Bundle installation is complete.</span><br><span class="line"></span><br><span class="line">Product install status:</span><br><span class="line">GBase: Successful</span><br><span class="line">GBase Connect: Successful</span><br><span class="line"></span><br><span class="line">Main Version: GBase 8s V8.7</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">For more information about using GBase products, see the GBase Information </span><br><span class="line">Center at http://www.gbase.cn.</span><br><span class="line"></span><br><span class="line">PRESS &lt;ENTER&gt; TO EXIT THE INSTALLER: </span><br><span class="line">[root@wei3 server]# </span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="配置实例"><a href="#配置实例" class="headerlink" title="配置实例"></a>配置实例</h3><h4 id="环境变量-bash-profile"><a href="#环境变量-bash-profile" class="headerlink" title="环境变量 .bash_profile"></a>环境变量 .bash_profile</h4><p>​		vi &#x2F;home&#x2F;gbasedbt&#x2F;.bash_profile</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">export GBASEDBTDIR=/opt/gbase</span><br><span class="line">export GBASEDBTSERVER=gbase01</span><br><span class="line">export ONCONFIG=onconfig.gbase01</span><br><span class="line">export GBASEDBTSQLHOSTS=$GBASEDBTDIR/etc/sqlhosts.gbase01</span><br><span class="line">export DB_LOCALE=zh_CN.utf8</span><br><span class="line">export CLIENT_LOCALE=zh_CN.utf8</span><br><span class="line">export LD_LIBRARY_PATH=$GBASEDBTDIR/lib:$GBASEDBTDIR/lib/esql:$GBASEDBTDIR/lib/cli:$GBASEDBTDIR/lib/dmi</span><br><span class="line">export PATH=$&#123;GBASEDBTDIR&#125;/bin:$&#123;PATH&#125;:.</span><br><span class="line">export LANG=zh_CN.utf8</span><br><span class="line">export DBDATE=Y4MD-</span><br><span class="line">export GL_USEGLU=1</span><br><span class="line">export BACKUPDIR=/home/gbasedbt/backup/ontape</span><br><span class="line">export DATADIR=/home/gbasedbt/data</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h4 id="监听协议-sqlhosts"><a href="#监听协议-sqlhosts" class="headerlink" title="监听协议 sqlhosts"></a>监听协议 sqlhosts</h4><p>​		说明： IP和端口根据需要修改。</p>
<p>​		vi $GBASEDBTDIR&#x2F;etc&#x2F;sqlhosts.gbase01</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">gbase01 onsoctcp 1.1.1.3 9088 </span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h4 id="数据库存储-chunk"><a href="#数据库存储-chunk" class="headerlink" title="数据库存储 chunk"></a>数据库存储 chunk</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">DATADIR=/home/gbasedbt/data</span><br><span class="line">mkdir $&#123;DATADIR&#125;</span><br><span class="line">touch $&#123;DATADIR&#125;/rootdbs</span><br><span class="line">touch $&#123;DATADIR&#125;/plogdbs</span><br><span class="line">touch $&#123;DATADIR&#125;/llogdbs</span><br><span class="line">touch $&#123;DATADIR&#125;/tmpdbs01</span><br><span class="line">touch $&#123;DATADIR&#125;/tmpdbs02</span><br><span class="line">touch $&#123;DATADIR&#125;/tmpdbs03</span><br><span class="line">touch $&#123;DATADIR&#125;/tmpdbs04</span><br><span class="line">touch $&#123;DATADIR&#125;/datachk01</span><br><span class="line">touch $&#123;DATADIR&#125;/sbchk01</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/rootdbs</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/plogdbs</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/llogdbs</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/tmpdbs01</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/tmpdbs02</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/tmpdbs03</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/tmpdbs04</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/datachk01</span><br><span class="line">chmod 660 $&#123;DATADIR&#125;/sbchk01</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h4 id="数据库参数-onconfig"><a href="#数据库参数-onconfig" class="headerlink" title="数据库参数 onconfig"></a>数据库参数 onconfig</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">DATADIR=/home/gbasedbt/data</span><br><span class="line">NUMCPU=`onstat -g osi |awk /&quot;online processors&quot;/&#x27;&#123;print $5-1&#125;&#x27;`</span><br><span class="line">cp $GBASEDBTDIR/etc/onconfig.std  $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^ROOTPATH.*#ROOTPATH $&#123;DATADIR&#125;/rootdbs#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^ROOTSIZE.*#ROOTSIZE 2048000 #g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^DBSERVERNAME.*#DBSERVERNAME $GBASEDBTSERVER#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^PHYSBUFF.*#PHYSBUFF 4096#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^LOGBUFF.*#LOGBUFF 4096#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^TAPEDEV.*#TAPEDEV /dev/null#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^LTAPEDEV.*#LTAPEDEV /dev/null#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^MULTIPROCESSOR.*#MULTIPROCESSOR 1#g&quot; $GBASEDBTDIR/etc/$ONCONFIG;</span><br><span class="line">sed -i &quot;s#^CLEANERS.*#CLEANERS 32#g&quot; $GBASEDBTDIR/etc/$ONCONFIG;</span><br><span class="line">sed -i &quot;s#^LOCKS.*#LOCKS 1000000#g&quot; $GBASEDBTDIR/etc/$ONCONFIG;</span><br><span class="line">sed -i &quot;s#^DEF_TABLE_LOCKMODE.*#DEF_TABLE_LOCKMODE row#g&quot; $GBASEDBTDIR/etc/$ONCONFIG;</span><br><span class="line">sed -i &quot;s#^DS_TOTAL_MEMORY.*#DS_TOTAL_MEMORY 4096000#g&quot; $GBASEDBTDIR/etc/$ONCONFIG;</span><br><span class="line">sed -i &quot;s#^SHMVIRTSIZE.*#SHMVIRTSIZE 4096000#g&quot; $GBASEDBTDIR/etc/$ONCONFIG;</span><br><span class="line">sed -i &quot;s#^SHMADD.*#SHMADD 2048000#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^STACKSIZE.*#STACKSIZE 2048#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^SBSPACENAME.*#SBSPACENAME sbspace01#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^DBSPACETEMP.*#DBSPACETEMP tmpdbs01,tmpdbs02,tmpdbs03,tmpdbs04#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^VPCLASS cpu.*#VPCLASS cpu,num=$&#123;NUMCPU&#125;,noage#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">echo &quot;BUFFERPOOL size=8k,buffers=512000,lrus=32,lru_min_dirty=50,lru_max_dirty=60&quot; &gt;&gt;$GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^DUMPSHMEM.*#DUMPSHMEM 0#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^SYSSBSPACENAME.*#SYSSBSPACENAME sbspace01#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^DS_NONPDQ_QUERY_MEM.*#DS_NONPDQ_QUERY_MEM 25600#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">echo &quot;NETTYPE soctcp,4,200,NET&quot; &gt;&gt;$GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>说明： 生产环境用上面的基本上可以了，也可以适当调整。个人测试环境可以再跑一下写明的脚本，把内存少分配点。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">sed -i &quot;s#^SHMVIRTSIZE.*#SHMVIRTSIZE 409600#g&quot; $GBASEDBTDIR/etc/$ONCONFIG;</span><br><span class="line">sed -i &quot;s#^SHMADD.*#SHMADD 204800#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^BUFFERPOOL size=8k.*#\#BUFFERPOOL size=8k#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">echo &quot;BUFFERPOOL size=8k,buffers=51200,lrus=32,lru_min_dirty=50,lru_max_dirty=60&quot;&gt;&gt;$GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="初始化实例"><a href="#初始化实例" class="headerlink" title="初始化实例"></a>初始化实例</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">oninit -ivy</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei3 ~]$ cat $GBASEDBTDIR/tmp/online.log |grep &quot;built successfully&quot;</span><br><span class="line">18:04:25  &#x27;sysmaster&#x27; database built successfully.</span><br><span class="line">18:04:25  &#x27;sysutils&#x27; database built successfully.</span><br><span class="line">18:04:25  &#x27;sysuser&#x27; database built successfully.</span><br><span class="line">18:04:36  &#x27;sysadmin&#x27; database built successfully.</span><br><span class="line">[gbasedbt@wei3 ~]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="关闭实例"><a href="#关闭实例" class="headerlink" title="关闭实例"></a>关闭实例</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">onmode -ky</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="禁用sysadmin"><a href="#禁用sysadmin" class="headerlink" title="禁用sysadmin"></a>禁用sysadmin</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">touch $GBASEDBTDIR/etc/sysadmin/stop</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="启动实例"><a href="#启动实例" class="headerlink" title="启动实例"></a>启动实例</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">oninit -v</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="配置DBSPACES"><a href="#配置DBSPACES" class="headerlink" title="配置DBSPACES"></a>配置DBSPACES</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">onspaces -c -d plogdbs   -p $&#123;DATADIR&#125;/plogdbs   -o 0 -s 5120000</span><br><span class="line">onspaces -c -d llogdbs   -p $&#123;DATADIR&#125;/llogdbs   -o 0 -s 10240000</span><br><span class="line">onspaces -c -d tmpdbs01  -p $&#123;DATADIR&#125;/tmpdbs01  -o 0 -s 10240000 -k 8 -t</span><br><span class="line">onspaces -c -d tmpdbs02  -p $&#123;DATADIR&#125;/tmpdbs02  -o 0 -s 10240000 -k 8 -t</span><br><span class="line">onspaces -c -d tmpdbs03  -p $&#123;DATADIR&#125;/tmpdbs03  -o 0 -s 10240000 -k 8 -t</span><br><span class="line">onspaces -c -d tmpdbs04  -p $&#123;DATADIR&#125;/tmpdbs04  -o 0 -s 10240000 -k 8 -t</span><br><span class="line">onspaces -c -d datadbs01 -p $&#123;DATADIR&#125;/datachk01 -o 0 -s 10240000 -k 8</span><br><span class="line">onspaces -c -S sbspace01 -p $&#123;DATADIR&#125;/sbchk01   -o 0 -s 10240000</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>说明：生产按照上面基本够用，根据实际情况扩容。 个人测试环境存储空间不足可以按照下面配置。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">onspaces -c -d plogdbs   -p $&#123;DATADIR&#125;/plogdbs   -o 0 -s 512000</span><br><span class="line">onspaces -c -d llogdbs   -p $&#123;DATADIR&#125;/llogdbs   -o 0 -s 1024000</span><br><span class="line">onspaces -c -d tmpdbs01  -p $&#123;DATADIR&#125;/tmpdbs01  -o 0 -s 1024000 -k 8 -t</span><br><span class="line">onspaces -c -d tmpdbs02  -p $&#123;DATADIR&#125;/tmpdbs02  -o 0 -s 1024000 -k 8 -t</span><br><span class="line">onspaces -c -d tmpdbs03  -p $&#123;DATADIR&#125;/tmpdbs03  -o 0 -s 1024000 -k 8 -t</span><br><span class="line">onspaces -c -d tmpdbs04  -p $&#123;DATADIR&#125;/tmpdbs04  -o 0 -s 1024000 -k 8 -t</span><br><span class="line">onspaces -c -d datadbs01 -p $&#123;DATADIR&#125;/datachk01 -o 0 -s 1024000 -k 8</span><br><span class="line">onspaces -c -S sbspace01 -p $&#123;DATADIR&#125;/sbchk01   -o 0 -s 1024000</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="配置逻辑日志"><a href="#配置逻辑日志" class="headerlink" title="配置逻辑日志"></a>配置逻辑日志</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">for i in `seq 100`;do onparams -a -d llogdbs -s 100000;done</span><br><span class="line">for i in `seq 7`;do onmode -l;done</span><br><span class="line">onmode -c</span><br><span class="line">for i in `seq 6`;do onparams -d -l $i -y;done</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="配置物理日志"><a href="#配置物理日志" class="headerlink" title="配置物理日志"></a>配置物理日志</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">onparams -p -d plogdbs -s 5000000 -y</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>说明：生产按照上面基本够用，根据实际情况扩容。 个人测试环境存储空间不足可以按照下面配置。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">onparams -p -d plogdbs -s 500000 -y</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="配置逻辑日志备份"><a href="#配置逻辑日志备份" class="headerlink" title="配置逻辑日志备份"></a>配置逻辑日志备份</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">BACKUPDIR=/home/gbasedbt/backup/ontape</span><br><span class="line">mkdir -p $BACKUPDIR</span><br><span class="line">onmode -wf  TAPEDEV=$BACKUPDIR</span><br><span class="line">onmode -wf LTAPEDEV=$BACKUPDIR</span><br><span class="line">onmode -wf  TAPEBLK=2048</span><br><span class="line">onmode -wf LTAPEBLK=2048</span><br><span class="line">sed -i &quot;s#^ALARMPROGRAM.*#ALARMPROGRAM \$GBASEDBTDIR/etc/log_full.sh#g&quot; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &quot;s#^BACKUP_CMD.*#BACKUP_CMD=\&quot;ontape -a -d\&quot; #g&quot; $GBASEDBTDIR/etc/log_full.sh</span><br><span class="line">onmode -ky</span><br><span class="line">oninit -v</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p> 测试逻辑日志备份是否配置成功</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">BACKUPDIR=/home/gbasedbt/backup/ontape</span><br><span class="line">ls -l $BACKUPDIR</span><br><span class="line">onmode -l</span><br><span class="line">onmode -l </span><br><span class="line">onmode -c</span><br><span class="line">ls -l $BACKUPDIR</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h3 id="配置数据库备份"><a href="#配置数据库备份" class="headerlink" title="配置数据库备份"></a>配置数据库备份</h3><h4 id="编写数据库备份脚本"><a href="#编写数据库备份脚本" class="headerlink" title="编写数据库备份脚本"></a>编写数据库备份脚本</h4><p>​		vi &#x2F;home&#x2F;gbasedbt&#x2F;backup&#x2F;backup.sh</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">!/bin/bash</span></span><br><span class="line">. /home/gbasedbt/.bash_profile</span><br><span class="line">onstat - |grep &quot;On-Line&quot; &gt; /dev/null</span><br><span class="line">if [ $? -ne 1 ]</span><br><span class="line">then</span><br><span class="line">DATE=`date`</span><br><span class="line">echo &quot;Level 0 backup of &quot;$GBASEDBTSERVER&quot; strat at &quot;$DATE</span><br><span class="line">ontape -s -L 0</span><br><span class="line">DATE=`date`</span><br><span class="line">echo &quot;Level 0 backup of &quot;$GBASEDBTSERVER&quot; completed at &quot;$DATE</span><br><span class="line">find /home/gbasedbt/backup/ontape -mtime +7 -type f |xargs rm -rf</span><br><span class="line">fi</span><br><span class="line">exit 0</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">chmod 755 /home/gbasedbt/backup/backup.sh</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h4 id="定义crontab定时备份数据库"><a href="#定义crontab定时备份数据库" class="headerlink" title="定义crontab定时备份数据库"></a>定义crontab定时备份数据库</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">0 0 * * * /home/gbasedbt/backup/backup.sh &gt;&gt; /home/gbasedbt/backup/backup.log 2&gt;&amp;1</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>说明： gbasedbt用户部署以下定时任务，backup.sh每天0点执行全量备份，同时删除7天以前备份。</p>
<h2 id="创建业务数据库"><a href="#创建业务数据库" class="headerlink" title="创建业务数据库"></a>创建业务数据库</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">su - gbasedbt</span><br><span class="line">dbaccess sysmaster &lt;&lt;!</span><br><span class="line">	create database testdb in datadbs01 with log;</span><br><span class="line">!</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>​	说明： 如果你想查询确认一下数据库的字符集请使用下面的命令</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">dbaccess sysmaster &lt;&lt;!</span><br><span class="line">	select * from sysdatabases;</span><br><span class="line">	select * from sysdbslocale;</span><br><span class="line">!</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>​	说明： </p>
<p>​		zh_CN.57372 对应的是 utf8 字符集。</p>
<p>​		zh_CN.5488   对应的是 zh_cn.GB18030-2000 字符集</p>
<h2 id="建表和查询测试"><a href="#建表和查询测试" class="headerlink" title="建表和查询测试"></a>建表和查询测试</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">dbaccess testdb &lt;&lt;!</span><br><span class="line">drop table if exists user;</span><br><span class="line">create table user (</span><br><span class="line">	id serial(8),</span><br><span class="line">	name varchar(5),</span><br><span class="line">	pwd decimal,</span><br><span class="line">	tm datetime year to second default current  year to second</span><br><span class="line">);</span><br><span class="line">insert into  user(name) values(&#x27;aaa&#x27;);</span><br><span class="line">insert into  user values(2,&#x27;aaa&#x27;,1,current);</span><br><span class="line">insert into  user values(3,&#x27;aaa&#x27;,2,current);</span><br><span class="line">insert into  user values(4,&#x27;aaa&#x27;,3,current);</span><br><span class="line">insert into  user values(5,&#x27;aaa&#x27;,3,&#x27;2022-06-15 20:20:20&#x27;);</span><br><span class="line">insert into  user values(6,&#x27;aaa&#x27;,3,&#x27;2022-06-14 20:20:20&#x27;);</span><br><span class="line">insert into  user values(7,&#x27;aaa&#x27;,3,&#x27;2022-06-13 20:20:20&#x27;);</span><br><span class="line">insert into  user values(8,&#x27;aaa&#x27;,3,&#x27;2022-06-15 15:20:20&#x27;);</span><br><span class="line">!</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">dbaccess testdb &lt;&lt;!</span><br><span class="line">	select * from user;</span><br><span class="line">!</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="修补to-char补丁"><a href="#修补to-char补丁" class="headerlink" title="修补to_char补丁"></a>修补to_char补丁</h2><h3 id="上传补丁到服务器"><a href="#上传补丁到服务器" class="headerlink" title="上传补丁到服务器"></a>上传补丁到服务器</h3><p>​			补丁下载地址：<a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1bsToJrJDwWhpvo0QTQI6FA">https://pan.baidu.com/s/1bsToJrJDwWhpvo0QTQI6FA</a><br>​			提取码：e0ue</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">补丁文件名称和MD5值：</span></span><br><span class="line">[root@wei3 p]# ls -l</span><br><span class="line">total 444</span><br><span class="line">-rw-rw-rw-. 1 root root  44450 Aug 14 08:41 boot1210.sql</span><br><span class="line">-rw-rw-rw-. 1 root root 399080 Aug 14 08:41 liboracle.udr</span><br><span class="line">-rw-rw-rw-. 1 root root    268 Aug 14 08:41 readme.txt</span><br><span class="line">-rw-rw-rw-. 1 root root   1707 Aug 14 08:42 to_char重新注册.sql</span><br><span class="line">[root@wei3 p]# </span><br><span class="line">[root@wei3 p]# md5sum liboracle.udr </span><br><span class="line">330924fe910c234078bde5f252c8a6e4  liboracle.udr</span><br><span class="line">[root@wei3 p]# </span><br><span class="line">[root@wei3 p]# md5sum boot1210.sql </span><br><span class="line">16da724a0e1edf6c7fc4089f0f342fa3  boot1210.sql</span><br><span class="line">[root@wei3 p]# </span><br><span class="line">[root@wei3 p]# pwd</span><br><span class="line">/opt/soft/gbase/sanxiajichang/to_char/p</span><br><span class="line">[root@wei3 p]# </span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>​	说明：补丁文件已经随，数据库server，数据库jdbc驱动，一起打包。</p>
<h3 id="关闭数据库"><a href="#关闭数据库" class="headerlink" title="关闭数据库"></a>关闭数据库</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">onmode -ky</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="替换liboracle-udr包"><a href="#替换liboracle-udr包" class="headerlink" title="替换liboracle.udr包"></a>替换liboracle.udr包</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">cp $GBASEDBTDIR/lib/liboracle.udr $GBASEDBTDIR/lib/liboracle.backup.a2_6</span><br><span class="line">cp /opt/soft/gbase/sanxiajichang/to_char/p/liboracle.udr $GBASEDBTDIR/lib/liboracle.udr</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="替换boot1210-sql文件"><a href="#替换boot1210-sql文件" class="headerlink" title="替换boot1210.sql文件"></a>替换boot1210.sql文件</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">cp $GBASEDBTDIR/etc/boot1210.sql $GBASEDBTDIR/etc/boot1210.backup.a2_6</span><br><span class="line">cp /opt/soft/gbase/sanxiajichang/to_char/p/boot1210.sql $GBASEDBTDIR/etc/boot1210.sql</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="启动数据库"><a href="#启动数据库" class="headerlink" title="启动数据库"></a>启动数据库</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">oninit -v</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h3 id="重新注册to-char函数"><a href="#重新注册to-char函数" class="headerlink" title="重新注册to_char函数"></a>重新注册to_char函数</h3><p>​		说明： 每个数据库都需要重新注册一下数据库，dbaccess连接上数据库后执行下面的sql语句就行，每个数据库逐一执行。</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">---1、修改</span></span><br><span class="line"><span class="keyword">update</span> sysprocedures <span class="keyword">set</span> mode <span class="operator">=</span> <span class="string">&#x27;D&#x27;</span> <span class="keyword">where</span> procname <span class="operator">=</span> <span class="string">&#x27;to_char&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">function</span> if <span class="keyword">exists</span> gbasedbt.to_char(datetime <span class="keyword">year</span> <span class="keyword">to</span> fraction(<span class="number">5</span>),</span><br><span class="line">                                         gbasedbt.lvarchar,</span><br><span class="line">                                         gbasedbt.lvarchar);</span><br><span class="line"><span class="keyword">drop</span> <span class="keyword">function</span> if <span class="keyword">exists</span> gbasedbt.to_char(gbasedbt.decimal,</span><br><span class="line">                                         gbasedbt.lvarchar,</span><br><span class="line">                                         gbasedbt.lvarchar);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">--重新注册to_char</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> dba <span class="keyword">function</span> gbasedbt.to_char(datetime <span class="keyword">year</span> <span class="keyword">to</span> fraction(<span class="number">5</span>),</span><br><span class="line">                                     gbasedbt.lvarchar <span class="keyword">default</span> <span class="string">&#x27;YYYY-MM-DD HH24:MI:SS&#x27;</span>,</span><br><span class="line">                                     gbasedbt.lvarchar <span class="keyword">default</span> <span class="string">&#x27;&#x27;</span>)</span><br><span class="line">  returning gbasedbt.lvarchar</span><br><span class="line">  <span class="keyword">with</span> (PARALLELIZABLE,<span class="keyword">NOT</span> VARIANT,HANDLESNULLS)</span><br><span class="line">  <span class="keyword">external</span> name <span class="string">&#x27;$GBASEDBTDIR/lib/liboracle.udr(orcl_date_to_char)&#x27;</span></span><br><span class="line">  <span class="keyword">language</span> C;</span><br><span class="line"></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">execute</span> <span class="keyword">on</span> <span class="keyword">function</span> gbasedbt.to_char(datetime <span class="keyword">year</span> <span class="keyword">to</span> fraction(<span class="number">5</span>),</span><br><span class="line">                                           gbasedbt.lvarchar,</span><br><span class="line">                                           gbasedbt.lvarchar)</span><br><span class="line">  <span class="keyword">to</span> public <span class="keyword">as</span> gbasedbt;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">create</span> dba <span class="keyword">function</span> gbasedbt.to_char(gbasedbt.decimal,</span><br><span class="line">                                     gbasedbt.lvarchar,</span><br><span class="line">                                     gbasedbt.lvarchar <span class="keyword">default</span> <span class="string">&#x27;&#x27;</span>)</span><br><span class="line">  returning gbasedbt.lvarchar</span><br><span class="line">  <span class="keyword">with</span> (PARALLELIZABLE,<span class="keyword">NOT</span> VARIANT,HANDLESNULLS)</span><br><span class="line">  <span class="keyword">external</span> name <span class="string">&#x27;$GBASEDBTDIR/lib/liboracle.udr(orcl_num_to_char)&#x27;</span></span><br><span class="line">  <span class="keyword">language</span> C;</span><br><span class="line"></span><br><span class="line"><span class="keyword">grant</span> <span class="keyword">execute</span> <span class="keyword">on</span> <span class="keyword">function</span> gbasedbt.to_char(gbasedbt.decimal,</span><br><span class="line">                                           gbasedbt.lvarchar,</span><br><span class="line">                                           gbasedbt.lvarchar)</span><br><span class="line">  <span class="keyword">to</span> public <span class="keyword">as</span> gbasedbt;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">----</span></span><br><span class="line"><span class="keyword">update</span> sysprocedures <span class="keyword">set</span> mode <span class="operator">=</span> <span class="string">&#x27;d&#x27;</span> <span class="keyword">where</span> procname <span class="operator">=</span> <span class="string">&#x27;to_char&#x27;</span>;</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="应用打包说明"><a href="#应用打包说明" class="headerlink" title="应用打包说明"></a>应用打包说明</h2><p>​	说明：</p>
<p>​		1、应用jdbc驱动需要使用上文描述的a2_6版。</p>
<p>​		2、应用hibernate框架需要使用上文描述的a2_6版。</p>
<p>​		3、应用url链接串如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">jdbc:gbasedbt-sqli://1.1.1.3:9088/testdb:GBASEDBTSERVER=gbase01;CLIENT_LOCALE=zh_cn.utf8;DB_LOCALE=zh_cn.utf8;IFX_LOCK_MODE_WAIT=100;DBDATE=Y4MD-;IFX_ISOLATION_LEVEL=1;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <div class="declare">
      <ul class="post-copyright">
        <li>
          <i class="ri-copyright-line"></i>
          <strong>Copyright： </strong>
          
          Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
          
        </li>
      </ul>
    </div>
    
    <footer class="article-footer">
       
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=http://example.com/2023/05/10/GBase8s%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2%E8%A7%84%E8%8C%83/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>  
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2/" rel="tag">安装部署</a></li></ul>

    </footer>
  </div>

   
  <nav class="article-nav">
    
      <a href="/2023/05/10/%E5%85%A5%E9%97%A8-Vue%E4%B9%8B%E8%B7%AF/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            入门-Vue之路
          
        </div>
      </a>
    
    
      <a href="/2023/05/10/%E6%89%93%E5%8C%85%E5%8F%91%E5%B8%83Vuenpm%E9%A1%B9%E7%9B%AE/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">打包发布Vuenpm项目</div>
      </a>
    
  </nav>

  
   
  
    
</article>

</section>
      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2023-2024
        <i class="ri-heart-fill heart_icon"></i> Wang Wei
      </li>
    </ul>
    <ul>
      <li>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>Visitors:<span id="busuanzi_value_site_uv"></span></span>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>Views:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
      </li>
    </ul>
  </div>
</footer>    
    </main>
    <div class="float_btns">
      <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

    </div>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ww.ico" alt="朝花夕拾"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
    
<script src="/js/jquery-3.6.0.min.js"></script>
 
<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->
 
<script src="/js/tocbot.min.js"></script>

<script>
  tocbot.init({
    tocSelector: ".tocbot",
    contentSelector: ".article-entry",
    headingSelector: "h1, h2, h3, h4, h5, h6",
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer: "main",
    positionFixedSelector: ".tocbot",
    positionFixedClass: "is-position-fixed",
    fixedSidebarOffset: "auto",
  });
</script>

<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
<link
  rel="stylesheet"
  href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
/>
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->

<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->
 
<script src="/js/busuanzi-2.3.pure.min.js"></script>
 
<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->
 
<link rel="stylesheet" href="/css/clipboard.css">
 <script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>
 
<!-- CanvasBackground -->

<script>
  if (window.mermaid) {
    mermaid.initialize({ theme: "forest" });
  }
</script>


    
    

  </div>
</body>

</html>